<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<h:outputStylesheet name="common-style.css" library="css" />
	<title>Quản trị - tiền gửi không kỳ hạn</title>
	<link rel="shortcut icon" type="image/x-icon"
		href="#{request.contextPath}/resources/images/favicon.ico" />
</h:head>
<h:body style="font-size: 11px;">
	<p:layout style="height:800px;width:1200px; margin:0 auto;" id="layout">
		<p:layoutUnit position="center">
			<p:graphicImage value="/resources/images/MDB.jpg" width="250"
				height="90" />
				<p:ajaxStatus onstart="modalDialogTest.show();"
				onsuccess="modalDialogTest.hide();" />
			<p:dialog id="modalDialog" showHeader="false" closable="true"
				widgetVar="modalDialogTest" modal="true">
				<p:graphicImage value="/resources/images/482.GIF" />
			</p:dialog>
			<h:form id="frmMainAdmin">
				<ui:insert name="menu">
					<ui:include src="/admin/menu.xhtml" />
				</ui:insert>
				<p:panel showHeader="true">
				<p:growl id="growl_ID" showDetail="true" sticky="true" />
					<p:dataTable id="dtbCustomerCasa" var="CAS"
						value="#{casaBean.csDataModel}"
						emptyMessage="Không có dữ liệu"
						selection="#{casaBean.casaSelected}" selectionMode="single"
						paginator="true" rows="15"
								paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
								rowsPerPageTemplate="10,15,20" paginatorPosition="bottom"
						>
						<f:facet name="header">
							<h:outputText value="TIỀN GỬI TIẾT KIỆM KHÔNG KỲ HẠN"
								style="float:left;" />
						</f:facet>
						<p:column headerText="STT" exportable="false">
							<h:outputText value="#{casaBean.csDataModel.rowIndex + 1}" styleClass="textBold" />
						</p:column>
							<p:column>
							<f:facet name="header">
								<h:outputText value="CHI NHÁNH" />
							</f:facet>
							<h:outputText value="#{CAS.branchCode}" styleClass="textBold" />
						</p:column>
						<p:column>
						<f:facet name="header">
								<h:outputText value="SỔ TIẾT KIỆM" />
							</f:facet>
							<h:outputText value="#{CAS.accountLocked}" styleClass="textBold" />
						</p:column>

						<p:column>
						<f:facet name="header">
								<h:outputText value="TÊN KHÁCH HÀNG" />
							</f:facet>
							<h:outputText value="#{CAS.customerName}" styleClass="textBold" />
						</p:column>

						<p:column>
						<f:facet name="header">
								<h:outputText value="SỐ TIỀN(VND)" />
							</f:facet>
							<h:outputText value="#{CAS.wbBalances}" styleClass="textBold">
								<f:convertNumber locale="en" pattern="#,##0.00;(#,##0.00)" />
							</h:outputText>
						</p:column>
						<p:column>
						<f:facet name="header">
								<h:outputText value="SÔ TIỀN CAM KẾT(VND)" />
							</f:facet>
							<h:outputText value="#{CAS.amountLocked}" styleClass="textBold">
								<f:convertNumber locale="en" pattern="#,##0.00;(#,##0.00)" />
							</h:outputText>
						</p:column>
						<p:column>
						<f:facet name="header">
								<h:outputText value="NGÀY CAM KẾT" />
							</f:facet>
							<h:outputText value="#{CAS.dateLocked}" styleClass="textBold">
								<f:convertDateTime type="date" pattern="dd/MM/yyyy" />
							</h:outputText>
						</p:column>
						<p:column>
						<f:facet name="header">
								<h:outputText value="THỜI HẠN" />
							</f:facet>
							<h:outputText value="#{CAS.termLocked}" styleClass="textBold" />
						</p:column>
						<p:column>
						<f:facet name="header">
								<h:outputText value="THẺ CÀO" />
							</f:facet>
							<h:outputText value="#{CAS.scCard}" styleClass="textBold" />
						</p:column>
						<p:column>
						<f:facet name="header">
								<h:outputText value="DỰ THƯỞNG" />
							</f:facet>
							<h:outputText value="#{CAS.luckyDraw}" styleClass="textBold" />
						</p:column>
					</p:dataTable>
					<h:panelGrid columns="2" id="frmExportData2Excell">
						<p:commandButton value="Xử lý để xuất tập tin excell"
							icon="ui-icon-arrow-4-diag"
							action="#{casaBean.fileExcellCasaPOI}"
							update="frmExportData2Excell,:frmMainAdmin:growl_ID">
						</p:commandButton>
						<p:commandButton ajax="false" value="Tải về máy" action="#{casaBean.downloadPreventedCS}"
							icon="ui-icon-arrowthickstop-1-s"
							disabled="#{casaBean.btnVisible == false}">
							<p:fileDownload value="#{casaBean.fileCasa}" 
								contentDisposition="attachment">
							</p:fileDownload>
						</p:commandButton>
					</h:panelGrid>
				</p:panel>
			</h:form>
		</p:layoutUnit>
		<h:outputText
			value="Bản quyền &#169; 2013 Ngân hàng TMCP Phát Triển Mê Kông. Xây dựng bởi Đỗ Đức Tú."
			style="font-style:italic;" />
	</p:layout>
</h:body>
</html>